<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class UserAddress extends Model
{
    use HasFactory;
    protected $guarded = [];
    protected $table = 'user_address';

    /**
     * 查询用户地址
     * @param $uid
     * @return mixed
     */
    public static function getUserAddress($uid){
        return self::where('uid',$uid)->where('is_default',0)->first();
    }
}
